#include"public.h"
#include"humanbuilder.h"
#include"actorcontroller.h"
#include"actor.h"
#include<memory>
#include<iostream>
#include<fstream>
#include"json.hpp"
using json = nlohmann::json;
using namespace std;
int main()
{
    fstream fs("../config/settings.json");
    json j;
    fs >> j;
    string builderType = j["builder"];

    ActorController actorController;
    //shared_ptr<WomanBuilder> womanbuilder = make_shared<WomanBuilder>();
    //Actor actor = actorController.construct(womanbuilder);
    std::shared_ptr<ActorBuilder> ab = builderMap[builderType]();
    Actor actor = actorController.construct(ab);
    cout << actor.getType() << endl;
    cout << actor.getSex() << endl;
    cout << actor.getFace() << endl;
    cout << actor.getHairstyle() << endl;
    cout << actor.getBody() << endl;
}